package com.wh.concurrent.atomic;

public class P1 {

	private long b = 0;
	
	public void set1() {
		b = 0;
	}
	
	public void set2() {
		b = -1;
	}
	
	public void check() {
		if(b != -1 && b != 0) {
			System.out.println(b);
			System.err.println("程序出错！");
		}
	}
}
